﻿namespace Blazor.Core;

public class RxExceptionHandler(ILogger<RxExceptionHandler> logger) : IObserver<Exception>
{
    public void OnCompleted()
    {
    }

    public void OnError(Exception error) => OnNext(error);

    public void OnNext(Exception ex)
    {
        logger.LogError(ex, "Unhandled exception");
    }
}